home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / t3_1 / sources.lha / sources / sys / dump_codes.t < prev    next >
Text File  |  1988-02-05  |  3KB  |  61 lines

  1. (herald dump_codes
  2.         (env t))
  3.  
  4. ;;; Copyright (c) 1985 Yale University
  5. ;;;     Authors: N Adams, R Kelsey, D Kranz, J Philbin, J Rees.
  6. ;;; This material was developed by the T Project at the Yale University Computer 
  7. ;;; Science Department.  Permission to copy this software, to redistribute it, 
  8. ;;; and to use it for any purpose is granted, subject to the following restric-
  9. ;;; tions and understandings.
  10. ;;; 1. Any copy made of this software must include this copyright notice in full.
  11. ;;; 2. Users of this software agree to make their best efforts (a) to return
  12. ;;;    to the T Project at Yale any improvements or extensions that they make,
  13. ;;;    so that these may be included in future releases; and (b) to inform
  14. ;;;    the T Project of noteworthy uses of this software.
  15. ;;; 3. All materials developed as a consequence of the use of this software
  16. ;;;    shall duly acknowledge such use, in accordance with the usual standards
  17. ;;;    of acknowledging credit in academic research.
  18. ;;; 4. Yale has made no warrantee or representation that the operation of
  19. ;;;    this software will be error-free, and Yale is under no obligation to
  20. ;;;    provide any services, by way of maintenance, update, or otherwise.
  21. ;;; 5. In conjunction with products arising from the use of this material,
  22. ;;;    there shall be no use of the name of the Yale University nor of any
  23. ;;;    adaptation thereof in any advertising, promotional, or sales literature
  24. ;;;    without prior written consent from Yale in each case.
  25. ;;;
  26.  
  27. ;;;
  28. ;;; codes used for encoding and decoding
  29. ;;;
  30.  
  31. ;;; Unstructured codes
  32. (define-constant dump/null               0)       ;;; the empty list
  33. (define-constant dump/char               1)       ;;; character
  34. (define-constant dump/true               2)       ;;; '#t
  35. (define-constant dump/begin-object       3)       ;;; put before each object
  36. (define-constant dump/end-of-file        4)       ;;; put at end of file
  37.  
  38. ;;; Codes that are shared or unshared
  39. ;;;   Low order bit zero = 0, not shared
  40. ;;;                      = 1, shared
  41. (define-constant dump/pair              16)       ;;; cons pair
  42. (define-constant dump/coded             18)       ;;; Coded by external proc.
  43.  
  44. ;;; Codes that have size bytes
  45. ;;;   Number of bytes = (+ 1 (remainder code 4))
  46. (define-constant dump/object-ref        32)       ;;; an already stored object
  47. (define-constant dump/positive-fixnum   36)       ;;; positive fixnum
  48. (define-constant dump/negative-fixnum   40)       ;;; negative fixnum
  49.  
  50. ;;; Codes that are shared or unshared and have size bytes
  51. ;;;   Low order bit zero = 0, not shared
  52. ;;;                      = 1, shared
  53. ;;;   Number of bytes = (+ 1 (quotient (remainder code 8) 2))
  54. (define-constant dump/string            64)       ;;; old string method
  55. (define-constant dump/symbol            72)       ;;; symbol
  56. (define-constant dump/vector            80)       ;;; vector
  57. (define-constant dump/byte-vector       88)       ;;; byte vector
  58. (define-constant dump/positive-bignum   96)       ;;; positive bignum
  59. (define-constant dump/negative-bignum  104)       ;;; negative bignum
  60. (define-constant dump/double-flonum    112)       ;;; two word flonum
  61.